﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RulesManage.aspx.cs" Inherits="Business_Booking_RulesManage"
    Theme="normal" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>规则管理页</title>

    <script type="text/javascript" src="../../js/Basic/BasicPage.js"></script>

</head>
<body style="background-color: #fcf6ec">
    <form id="form1" runat="server">
        <%--<div class="normalnav">
            <div class="normalcontent">
                数据管理>>>规则信息管理</div>
        </div>--%>
        <div class="normalnav">
            <div class="normalcontent">
                <span style="color: #ffffff">数据管理>>></span><span style="color: #f6ff00">规则信息管理</span>
            </div>
        </div>
        <!-- 查询框-->
        <%-- <div class="normalmenu" style="position: absolute; z-index: 100;">
            <div class="normalmenucontent" style="padding-left:10px;">--%>
        <div class="normalmenu" style="position: absolute; z-index: 100;">
            <div class="normalmenucontent" style="padding-left: 10px;">
                请输入规则名称或代码:&nbsp;
                <asp:TextBox ID="txtPropasal" runat="server" Font-Size="14px" Width="123px" MaxLength="20"></asp:TextBox>
                <asp:ImageButton ID="ibtnsearch" runat="server" ImageUrl="../../Images/Basic/chaxun.gif"
                    OnClick="butlookout_Click" />
                &nbsp; &nbsp; <span style="color: #426F98; font-family: 宋体; font-size: 12px">注：为空则查询所有</span>
                &nbsp; &nbsp;
            </div>
        </div>
        <%--显示数据列表--%>
        <div class="normalgrid" style="left: 10px;">
            <asp:GridView ID="gvitem" runat="server" SkinID="Normal" OnPageIndexChanging="gvitem_PageIndexChanging"
                Width="96%" EmptyDataText="暂无" OnRowDataBound="gvitem_RowDataBound" AutoGenerateColumns="false"
                OnRowCommand="gvitem_RowCommand">
                <Columns>
                    <asp:TemplateField HeaderText="选择" Visible="true" HeaderStyle-Width="35px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:CheckBox ID="cb_ID" runat="server" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="序号" Visible="false" HeaderStyle-Width="35px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lbl_No" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="规则标识" Visible="False" HeaderStyle-Width="40px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="LblID" Text='<%# Eval("RuleID")%>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="规则名称" HeaderStyle-Width="80px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <a href='RuleView.aspx?RuleID=<%#Eval("RuleID") %>'>
                                <asp:Label runat="server" ID="Lbl_RuleName" Text='<%# Eval("RuleName")%>' /></a>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="规则代码" HeaderStyle-Width="80px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="Lbl_RuleCode" Text='<%# Eval("RuleCode")%>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="分隔符" HeaderStyle-Width="50px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="Lbl_RuleBreakSymbol" Text='<%# Eval("RuleBreakSymbol") %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="结束符" HeaderStyle-Width="50px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="Lbl_RuleEndSymbol" Text='<%# Eval("RuleEndSymbol") %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="发送模板" HeaderStyle-Width="150px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="Lbl_RuleOrderTemplate" Text='<%# Eval("RuleOrderTemplate").ToString().Length>12?Eval("RuleOrderTemplate").ToString().Substring(0,10) + "..":Eval("RuleOrderTemplate") %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="150px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="回复模板" HeaderStyle-Width="150px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="Lbl_RuleReply" Text='<%# Eval("RuleReply").ToString().Length>12?(Eval("RuleReply").ToString().Substring(0,10) + "...."):Eval("RuleReply") %>' />
                            <div style="display: none; border: solid 1px #F5F5F5;" id="div_reply">
                                <span>
                                    <%# Eval("RuleReply")%>
                                </span>
                            </div>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" Width="150px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作" HeaderStyle-Width="60px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:LinkButton ID="lb_edit" runat="server" CommandName="edit" CommandArgument='<%#Eval("RuleID") %>'>修改</asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="60px" />
                    </asp:TemplateField>
                </Columns>
                <PagerSettings Visible="False" />
            </asp:GridView>
        </div>
        <!-- 命令按钮 -->
        <div style="position: absolute; top: 395px; left: 20px;">
            <asp:CheckBox ID="ChkAll" runat="server" Text="全选" onclick="javascript:SelectAllCheckboxes(this)"
                Font-Size="14px" />
            <asp:ImageButton ID="butDelete" runat="server" ImageUrl="../../Images/Basic/shanchu.gif"
                OnClick="butDelete_Click" CausesValidation="False" ToolTip="删除" OnClientClick="return confirm('您确认删除吗？');" />&nbsp;删除&nbsp;&nbsp;
            <asp:ImageButton ID="ibtnxinzeng" runat="server" ImageUrl="../../Images/Basic/tianjia.gif"
                CausesValidation="False" OnClick="ibtnxinzeng_Click" ToolTip="新增" />&nbsp;新增
        </div>
        <!--翻页按钮-->
        <div class="normalpager" id="div_pager" runat="server">
            <asp:Label ID="lblNumbers" runat="server"></asp:Label>&nbsp;&nbsp;
            <asp:LinkButton ID="btnFirst" OnClick="PagerButtonClick" runat="server" CommandArgument="0"
                CausesValidation="False">最首页</asp:LinkButton>&nbsp;
            <asp:LinkButton ID="btnPrev" OnClick="PagerButtonClick" runat="server" CommandArgument="prev"
                CausesValidation="False">前一页</asp:LinkButton>&nbsp;
            <asp:Label ID="lblCurrentIndex" runat="server"></asp:Label>&nbsp;/&nbsp;
            <asp:Label ID="lblPageCount" runat="server"></asp:Label>
            <asp:LinkButton ID="btnNext" OnClick="PagerButtonClick" runat="server" CommandArgument="next"
                CausesValidation="False">后一页</asp:LinkButton>&nbsp;
            <asp:LinkButton ID="btnLast" OnClick="PagerButtonClick" runat="server" CommandArgument="last"
                CausesValidation="False">最后页</asp:LinkButton>
        </div>
    </form>
</body>
</html>
